(function (exports) {
    var $ = null;
    var paiInfo = function () {
        var t = [];

        //wan
        t.push(1);
        //tong
        t.push(3);
        //tiao
        t.push(2);

        return t;
    }();

    exports.QueMenLayer = cc.Layer.extend({

        onEnter: function () {
            cc.Layer.prototype.onEnter.call(this);
        },

        onExit: function () {
            cc.Layer.prototype.onExit.call(this);
        },

        ctor: function (node,data) {
            this._super();
            var that = this;

            if (res["QueMenLayer_json"])
                scene = loadNodeCCS(res["QueMenLayer_json"], that);
            else
                return;
            // that.addChild(scene.node);

            $ = create$(scene.getChildByName("root"));

            for (var i = 0; i < paiInfo.length; i++) {
                (function (i) {
                    if ($('pai_' + (i + 1))) {
                        TouchUtil.setOnclickListener($('pai_' + (i + 1)), function () {
                            network.send(4061, {room_id: gameData.roomId, uid: gameData.uid, que: paiInfo[i]});
                            node.queMenLayer = null;
                            that.removeFromParent(true);
                        });
                    }
                })(i)
            }
            return true;
        }
    });
})(window);
